package org.komarichin.struts2.actions;

import org.komarichin.beans.service.IOutdoorService;
import org.komarichin.struts2.BaseAction;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * User: Michael Komarichin aka mikom
 * Date: 24.05.2010
 * Time: 15:06:08
 */
public class OutdoorAction extends BaseAction{

    private String backup;

    @Autowired
    private IOutdoorService outdoorServer;

    public String backup() throws Exception {
        backup = outdoorServer.makeBackUp();        
        return SUCCESS;
    }

    public String restore() throws Exception{
        outdoorServer.makeRestore(backup);
        return SUCCESS;
    }

    public String getBackup() {
        return backup;
    }

    public void setBackup(String backup) {
        this.backup = backup;
    }
}
